unit uLoaderbase;

interface

uses
  Windows,SysUtils,Classes,uGlobal;

type
  TLoaderBase=class
  private
    FBallList:TList;
  protected
    function getBallList:TList;
  public
    constructor Create;
    destructor Destroy;Virtual;

    procedure LoadBallList;virtual;abstract;
    procedure AddNumbers(AItem:Pointer);virtual;abstract;
    procedure DeleteNumber(AIndex:integer);overload;virtual;abstract;
    procedure DeleteNumber(AItem:Pointer);overload;virtual;abstract;
    procedure UpdateNumber(AItem:Pointer);virtual;abstract;

    procedure InsertHotDegree(AtbHD:TtbHotDegree);virtual;abstract;
  public
    property BallList:TList read FBallList write FBallList;
  end;
implementation

{ TLoaderBase }

constructor TLoaderBase.Create;
begin
  FBallList:=TList.Create;
end;

destructor TLoaderBase.Destroy;
var
  i:integer;
begin
  if Assigned(FBallList) then
  begin
    for i := FballList.Count-1 downto 0 do
      Dispose(FBallList.Items[i]);

    FBallList.Free;
  end;

end;

function TLoaderBase.getBallList: TList;
begin
  if not Assigned(FBallList) then
    FBallList:=TList.Create;
  Result:=FBallList;
end;

end.
